<%@ page pageEncoding="utf-8" import="java.util.*" %>
<%@ page import="DoMain.Food" %>
<%@ page import="Dao.CriteriaFood" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

    <title>在线订餐</title>
  </head>
  <body>

    <a href="pageOrderFood.do?currentPage=1">点击查看所有套餐</a><br>
  
  <%	List<Food> foods=(List<Food>)request.getAttribute("foods"); %>
  
  
  
  <table class="table table-hover">

    <tr class="table-primary" align="center">
      <th scope="col" align="center">套餐编号</th>
      <th scope="col" align="center">套餐名称</th>
      <th scope="col" align="center">套餐描述</th>
      <th scope="col" align="center">套餐价格</th>
  	  <th scope="col" align="center">点击查看</th>
    </tr>


  <c:forEach items="${foods}" var="fo">
			<tr  class="table-light">
				<td class="table-success" scope="row" align="center">${fo.foodNo}</td>
				<td class="table-success" scope="row" align="center">${fo.foodName}</td>
				<td class="table-warning" scope="row" align="center">${fo.foodDescription}</td>
				<td class="table-warning" scope="row" align="center">${fo.foodPrice}</td>
				<td align="center"><a href="order.do?foodNo=${fo.foodNo}">订购</a>
				</td>
			</tr>
			</c:forEach>
   

  	</table>
  	
  	<table align="center">
	<tr align="center">
    <td align="center" class="page-item"><a class="page-link" href="pageOrderFood.do?currentPage=1">首页</a></td>
    <td align="center" class="page-item"><a class="page-link" href="pageOrderFood.do?currentPage=1">1</a></td>
    <td align="center" class="page-item"><a class="page-link" href="pageOrderFood.do?currentPage=2">2</a></td>
    <td align="center" class="page-item"><a class="page-link" href="pageOrderFood.do?currentPage=3">3</a></td>
    <td align="center" class="page-item"><a class="page-link" href="pageOrderFood.do?currentPage=4">4</a></td>
    <td align="center" class="page-item"><a class="page-link" href="pageOrderFood.do?currentPage=5">5</a></td>
    <td align="center" class="page-item"><a class="page-link" href="pageOrderFood.do?currentPage=5">尾页</a></td>
</table>
</tr>

  </body>
  </html>